今天是雙十節
要好好祝中華民國生日~
覺得過生日就好像是要"倒數"的感覺
所以到這篇
我決定要來寫一個倒數計時
目前先寫一個初形~
因為要趕著去看煙火
DateTime MyEndDate = new DateTime(2009,01,01,00,00,00);
DateTime MyStartDate = DateTime.Now;
TimeSpan MySpan = MyEndDate.Subtract(MyStartDate);
string diffDay=Convert.ToString(MySpan.Days);
string diffHour = Convert.ToString(MySpan.Hours);
string diffMin = Convert.ToString(MySpan.Minutes);
string diffSec = Convert.ToString(MySpan.Seconds);
String MyInfo = "距離2021新年還有 " + diffDay + " 天 " + diffHour + " 時 " + diffMin + " 分 " + diffSec + " 秒 ";
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
Console.WriteLine(MyInfo);
}
DEAR ALL 我們明天見